//
//  buttomView.swift
//  MySinaWeiBo
//
//  Created by zhangfuwei on 15/8/4.
//  Copyright © 2015年 zhangfuwei. All rights reserved.
//

import UIKit

class buttomView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        prepareUI()
    }

    func prepareUI() {
        
        backgroundColor = UIColor(white: 0.8, alpha: 1.0)
        addSubview(forwardBtn)
        addSubview(comentBtn)
        addSubview(likeBtn)
        
        ff_HorizontalTile([forwardBtn,comentBtn,likeBtn], insets: UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 2))
        
//        let w : CGFloat = UIScreen.mainScreen().bounds.size.width / 3.0
//        forwardBtn.ff_AlignInner(type: ff_AlignType.BottomLeft, referView: self, size: CGSize(width: w, height: 50) , offset: CGPoint(x:0, y: 0))
//
//        comentBtn.ff_AlignInner(type: ff_AlignType.BottomLeft, referView: self, size: CGSize(width: w, height: 50) , offset: CGPoint(x: w , y: 0))
//        
//        likeBtn.ff_AlignInner(type: ff_AlignType.BottomLeft, referView: self, size: CGSize(width: w, height: 50) , offset: CGPoint(x: w * 2, y: 0))
    }
    
    private lazy var  forwardBtn :UIButton = UIButton(title: "转发", imageName: "timeline_icon_retweet", fontSize: 16)
    private lazy var comentBtn: UIButton = UIButton(title: "评论", imageName: "timeline_icon_comment", fontSize: 16)
    
    private lazy var likeBtn :UIButton = UIButton(title: "赞", imageName:  "timeline_icon_unlike", fontSize: 16)
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
